# Contributor: Oleg Titov <oleg.titov@gmail.com>
# Maintainer: Oleg Titov <oleg.titov@gmail.com>
pkgname=py3-cymem
pkgver=2.0.5
pkgrel=2
pkgdesc="Cython memory pool for RAll-style memory management"
url="https://github.com/explosion/cymem"
arch="all"
license="MIT"
depends="python3"
makedepends="python3-dev py3-setuptools cython"
checkdepends="py3-pytest"
subpackages="$pkgname-doc"
source="cymem-$pkgver.tar.gz::https://github.com/explosion/cymem/archive/v$pkgver.tar.gz"
builddir="$srcdir/cymem-$pkgver"

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="$(echo $PWD/build/lib.*)" pytest-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"

	install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}

sha512sums="3bb1fa6a8dee6ffb60a244682a3d869b057bbe44b49c03e3ef79703a1076c50f9850f6e06c232ff317afcf213f77c7fb4561004a10056f806d5795b44c626ffe  cymem-2.0.5.tar.gz"
